package com.zh.zhbootcommon.entity.mp;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zh.zhbootcommon.domain.DBaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 小程序用户信息表
 * </p>
 *
 * @author JueDream
 * @since 2021-08-13
 */
@Getter
@Setter
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("zh_mini_user_info")
@ApiModel(value="MiniUserInfo对象", description="小程序用户信息表")
public class MiniUserInfo extends DBaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "ID")
    @TableId(value = "m_id", type = IdType.AUTO)
    public Integer mId;

    @ApiModelProperty(value = "昵称")
    @TableField("m_name")
    public String mName;

    @ApiModelProperty(value = "联系方式")
    @TableField("m_phone")
    public String mPhone;

    @ApiModelProperty(value = "性别(0-先生; 1-女士)")
    @TableField("m_sex")
    public Integer mSex;

    @ApiModelProperty(value = "头像")
    @TableField("m_img")
    public String mImg;

    @ApiModelProperty(value = "角色分类(0-司机; 1-乘客)")
    @TableField("m_type")
    public Integer mType;

    @ApiModelProperty(value = "小程序openid")
    @TableField("openid")
    public String openId;

    @ApiModelProperty(value = "用户VIP等级ID")
    @TableField("m_level_id")
    public Integer mLevelId;

    @ApiModelProperty(value = "用户VIP等级")
    @TableField(exist = false)
    public String mLeveName;

    public MiniUserInfo(){}

    @Builder
    public MiniUserInfo(Integer mId, String mName, String mPhone, Integer mSex, String mImg, Integer mType, String openId, Integer mLevelId, String mLeveName) {
        this.mId = mId;
        this.mName = mName;
        this.mPhone = mPhone;
        this.mSex = mSex;
        this.mImg = mImg;
        this.mType = mType;
        this.openId = openId;
        this.mLevelId = mLevelId;
        this.mLeveName = mLeveName;
    }
}
